package com.ctbu.tourism.service;

import com.ctbu.tourism.api.LikesAPI;
import com.ctbu.tourism.entity.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LikesService {
    @Autowired
    LikesAPI likesAPI;

    public Integer getLikesByPID(Integer pid){
        return likesAPI.getLikesByPID(pid);
    }

    public List<Integer> getLikesPostUids(Integer pid){return likesAPI.getLikesPostUids(pid);}

    public Integer addLikes(Integer pid,Integer uid){return likesAPI.addLikes(pid,uid); }
    public Integer deleteLikes(Integer pid,Integer uid){return likesAPI.deleteLikes(pid,uid); }
    public Integer deleteLikesByPID(Integer pid){return likesAPI.deleteLikesByPID(pid); }
    public List<Message> getMessageByUID(Integer uid){return likesAPI.getMessageByUID(uid);}
    public Integer updateLikesStatus(Integer uid){return likesAPI.updateLikesStatus(uid);}


}
